package cn.bgs.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.catalina.User;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 小区中间表
 * </p>
 *
 * @author cf
 * @since 2022-06-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="CellIntermediate对象", description="小区中间表")
public class CellIntermediate implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "小区中间表id")
    @TableId(value = "middle_id", type = IdType.AUTO)
    private Integer middleId;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "小区id")
    private Integer communityId;

    @ApiModelProperty(value = "楼栋id")
    private Integer buildingId;

    @ApiModelProperty(value = "单元表id")
    private Integer cellId;

    @ApiModelProperty(value = "楼层表id")
    private Integer floorId;

    @ApiModelProperty(value = "房屋表id")
    private Integer portalId;

    @ApiModelProperty(value = "审核状态（审核成功、审核中、审核失败）")
    private Integer middleState;

    @DateTimeFormat(pattern = "yyyy-MM-dd ")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")//JsonFormat是出参格式化。
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd ")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")//JsonFormat是出参格式化。
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "删除标志（y是删除 n是未删除）")
    private String deleteFlag;

    @ApiModelProperty(value = "关联用户表")
    private User user;

    @ApiModelProperty(value = "关联小区表")
    private Community community;

    @ApiModelProperty(value = "关联楼栋表")
    private Building building;

    @ApiModelProperty(value = "关联单元表")
    private Cell cell;

    @ApiModelProperty(value = "关联楼层表")
    private Floor floor;

    @ApiModelProperty(value = "关联房屋表")
    private Portal portal;
    @ApiModelProperty("楼座表")
    private List<Building> buildings;
    @ApiModelProperty("门户表")
    private List<Portal> portals;
    @ApiModelProperty("小区表")
    private List<Community> communities;
    @ApiModelProperty("用户表")
    private List<User> users;


}
